Beginners Guide to Web Design by Bashir Chatto

Beginners Guide to Web Design by Bashir Chatto

Author:Bashir, Chatto [Bashir, Chatto]
Language: eng
Format: epub
Published: 2020-08-21T16:00:00+00:00


Figure 11.20: selectors.html opened in a web browser.

NOTE: The link to the external style-sheet should be placed before the embedded style-sheet just like we have it on Figure 11.19. Failing to do that will cause the external style sheet to have a higher priority over the embedded style-sheet which is not what we want.

​ You might be wondering what happened to the CSS rules we wrote for the <h1> tag within the style.css file. It was overwritten by the embedded style-sheet. This implies that, embedded style-sheets have a higher priority over an external style-sheet, and that is why, instead of seeing a header with a black background and white text color which was the CSS rules that we wrote in our external style-sheet, we are seeing a blue background with an orange text color.

Step 3: The third step we will use to demonstrate how CSS priority works is by using inline styling. We are going to apply the same CSS properties to our <h1> tag using inline styling. However, different values will be used this time. Figure 11.21 shows the selectors.html file with an inline styling applied to the <h1> tag.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.